package com.weishaoying.mongo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;

/**
 * @author WeiShaoying
 * @date 2018/5/16
 */
@Configuration
//启用Mongo仓库，如果没有指定basePackages，将会扫描这个类所在的包
@EnableMongoRepositories(basePackages = "com.weishaoying.mongo.repository.primary", mongoTemplateRef = PrimaryMongoConfig.MONGO_TEMPLATE)
public class PrimaryMongoConfig {

    static final String MONGO_TEMPLATE = "primaryMongoTemplate";

}
